package myTest;

import java.math.BigDecimal;
import java.util.stream.IntStream;

public class BigDecimalTest {
    public static void main(String[] args) {
        BigDecimal fee = new BigDecimal("0");
        BigDecimal earnings = new BigDecimal("1");
        BigDecimal requiredBal = fee;
        requiredBal = requiredBal.add(earnings);
        System.out.println(requiredBal);
        System.out.println(fee);
        System.out.println(earnings);

        BigDecimal bigDecimal1 = new BigDecimal("1");
        BigDecimal bigDecimal2 = new BigDecimal("1.000");
        System.out.println(bigDecimal1.equals(bigDecimal2));
        System.out.println(bigDecimal1.compareTo(bigDecimal2) == 0);

        System.out.println(1 << 30);
        int n = 16;
        n = n - (n >>> 2);
        System.out.println(n >> 2);
        System.out.println(n >>> 2);
        System.out.println(n - (n >>> 2));
        System.out.println(2 << 4-1);
        System.out.println(Math.pow(2,4));
        System.out.println(Integer.toBinaryString(15) );
        System.out.println(-366538584 & 15);
        System.out.println(-366538584 % 16);

        System.out.println(366538584 & 31);
        System.out.println(366538584 % 32);

        IntStream.range(0,1000).forEach(i->{
            System.out.println(i);
        });
    }

}
